module.exports = app => {
  const exports = {};

  exports.redis = {
    client: {
      port: 63790,          // Redis port
      host: '127.0.0.1',   // Redis host
      password: '',
      db: 0,
    },
    agent: true,
  };

  exports.sequelize = {
    datasources: [
      {
        delegate: 'model',
        baseDir: 'model',
        dialect: 'mysql',

        host: '127.0.0.1',
        port: '33060',
        database: 'live',
        username: 'live',
        password: '',

        pool: {
          max: 5,
          min: 0,
          idle: 1000,
        },
        timezone: '+08:00',
      },
      {
        delegate: 'spider',
        baseDir: 'model_spider',
        dialect: 'mysql',

        host: '127.0.0.1',
        port: '33060',
        database: 'live',
        username: 'live',
        password: '',

        pool: {
          max: 10,
          min: 0,
          idle: 1000,
        },
        timezone: '+08:00',
      },
    ],
  };

  return exports;
};
